/*
 * Copyright 2010 Biz-e (info@biz-e.nl)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.biz_e.urenfact.shared.model;

import java.util.Date;

import javax.persistence.Id;

import nl.biz_e.appengine.lib.shared.objectify.IEntity;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Indexed;
import com.googlecode.objectify.annotation.Unindexed;

/**
 * TODO: Write type comment
 * 
 * @author Joost A. Bloemsma
 */
@Unindexed
public class WorkDone implements IEntity {
    @Id
    private Long id;
    private int minutes;
    @Indexed
    private Date date;
    @Indexed
    private Key<Employee> employee;
    @Indexed
    private Key<Project> project;
    @Indexed
    private TimeType type;

    /**
     * {@inheritDoc}
     */
    @Override
    public Long getId() {
        return id;
    }

    /**
     * @return the minutes
     */
    public int getMinutes() {
        return minutes;
    }

    /**
     * @param minutes
     *            the minutes to set
     */
    public void setMinutes(int minutes) {
        this.minutes = minutes;
    }

    /**
     * @return the date
     */
    public Date getDate() {
        return date;
    }

    /**
     * @param date
     *            the date to set
     */
    public void setDate(Date date) {
        this.date = date;
    }

    /**
     * @return the employee
     */
    public Key<Employee> getEmployee() {
        return employee;
    }

    /**
     * @param employee
     *            the employee to set
     */
    public void setEmployee(Key<Employee> employee) {
        this.employee = employee;
    }

    /**
     * @return the project
     */
    public Key<Project> getProject() {
        return project;
    }

    /**
     * @param project
     *            the project to set
     */
    public void setProject(Key<Project> project) {
        this.project = project;
    }

    /**
     * @return the type
     */
    public TimeType getType() {
        return type;
    }

    /**
     * @param type
     *            the type to set
     */
    public void setType(TimeType type) {
        this.type = type;
    }

}
